package com.hall.service;

import com.hall.dao.ScheduleMapper;
import com.hall.pojo.Userschedule;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SchedulesServiceImpl implements ScheduleService {
    @Autowired
    private ScheduleMapper scheduleMapper;

    @Override
    public Userschedule findUserSchedule(Userschedule userschedule) {
        return scheduleMapper.findOne(userschedule);
    }

    @Override
    public int addUserSchedule(Userschedule userschedule1) {
        return scheduleMapper.addOne(userschedule1);
    }

    @Override
    public int updateUserSchedule(Userschedule userschedule3) {
        return scheduleMapper.updateOne(userschedule3);
    }

    @Override
    public List<Userschedule> findAllSchedule(String userid, String scheduledate,String nextFiveday) {
        return scheduleMapper.findAll(userid,scheduledate,nextFiveday);
    }

    @Override
    public int clearAllSchedule(Userschedule userschedule3) {
        return scheduleMapper.clearAll(userschedule3);
    }

    @Override
    public List<String> findHaveScheduleUser() {
        return scheduleMapper.haveScheduleUser();
    }

    @Override
    public List<Userschedule> GetNextSchedule(String userid, String scheduledate) {
        return scheduleMapper.GetNextSchedule(userid,scheduledate);
    }

    @Override
    public int setNext(Userschedule userschedule3) {
        return scheduleMapper.setNext(userschedule3);
    }

    @Override
    public String usertimeconfig(String userid, String scheduledate) {
        return scheduleMapper.usertimeconfig(userid,scheduledate);
    }

    @Override
    public String getUserName(String id) {
        return scheduleMapper.getUserName(id);
    }

    public void setScheduleMapper(ScheduleMapper scheduleMapper) {
    }
}
